home *** CD-ROM | disk | FTP | other *** search
/ Mac Format 1994 October / Macformat17.cdr / Shareware City / Developers / Think C dcmd 1.0 ƒ / Think Put Lib source / PutPStrTo.c < prev    next >
C/C++ Source or Header  |  1994-06-13  |  382b  |  21 lines

  1.     extern    unsigned char    buffer[256];
  2.     extern    short            mark;
  3.  
  4. void PutChar(char c);
  5. void PutSpacesTo(int endpos);
  6.  
  7. void PutPStrTo(const unsigned char* s, int endpos)
  8. {
  9.         int    i;
  10.  
  11.     if ( endpos > mark )
  12.     {
  13.         for ( i=1; i<= s[0] && mark<endpos; i++ )
  14.             PutChar( s[i] );
  15.             
  16.         if ( i<= s[0] )
  17.             buffer[mark] = '…';
  18.         else
  19.             PutSpacesTo( endpos );        /* pads with spaces if necessary */
  20.     }
  21. }